<wininfo> : Retrieve Information About Window

This command retrieves information about required window.   After the command is processed, required information is saved in following system variables:

_vWinRectX1                  - X position of upper left corner of the window in screen coordinates
_vWinRectY1                 - Y position of upper left corner of the window in screen coordinates
_vWinRectX2                  - X position of lower right corner of the window in screen coordinates
_vWinRectY2                 - Y position of lower right corner of the window in screen coordinates
_vWinWdt                      - windowÆs width
_vWinHgt                       - windowÆs height
_vWinTitle                      - window title
_vWinClass                    - window class
_vWinState                    - window state (MIN, RESTORE, MAX, HIDDEN)
_vWinActive                   - YES, if window is active (on top receiving keyboard input), otherwise NO
_vWinHWND                  - HWND of the window

Syntax:
 

<wininfo>("WinTitleOrHWND", "Unused",  Match)

WinTitleOrHWND
Title of the window to activate or HWND.  HWND is a unique handle Windows internally uses to identify each window.  The HWND can be retrieved by some commands (<wininfo>, <win_enumerate>) or is provided by some system variables (_vKeybdFocusWindow_HWND, _vActiveWindow_HWND, _vActiveWindowPrev_HWND).

Unused
Must be empty.

Match
Takes effect only if a window title is used as WinTitleOrHWND parameter. Can be one of these values:
0 - WinTitle can be substring of a window title
1 - WinTitle must exactly match a window title 


Example:
 

<#> This macro retrieves information about "Notepad" window
<#>
<cmds> 

<if_win>("Notepad","OPEN",0)
   <wininfo>("Notepad","",0)
   <msg>(-100,-100,"Window information:

%_vWinTitle%

%_vWinClass%

%_vWinActive%

%_vWinState%","Message",1)

<else>
   <msg>(100,100,"'Notepad' is not opened!","Message",1)
<endif>